package com.cskaoyan.shopping.converter;

import com.cskaoyan.shopping.dal.entitys.Item;
import com.cskaoyan.shopping.dto.TestProductDetailDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(componentModel = "spring")
public interface ITestProductConverter {

    // Item -> TestProductDetailDto
    @Mapping(source = "title", target = "productName")
    @Mapping(source = "image", target = "imgUrl")
    TestProductDetailDto itemDoToDetailDto(Item item);
}
